python access class variable by string

43

# name must be a string
# default is optional
getattr(object, name, default)

Comments

Submit
0 Comments